<?php

class CaseCatering extends Zend_Db_Table_Abstract
{
	protected $_name = 'case_catering';
	
	private $_errorCode = '';
	private $_errorStr = '';
	
	public function getErrorCode() { return $this->_errorCode; }
	public function getErrorStr() { return $this->_errorStr; }
	
	public function getCaseCatering( $case_num )
	{
		$results = array();
		
		if(empty($case_num))
		{
			$results['status'] = 'FAILED_BAD_PARAM';
			return $results;
		}
		
		try
		{
			$results['rows'] = array();
			$row = $this->fetchRow("FDMS_case_num='$case_num'");
			if($row)
				$results['rows'][] = $row->toArray();
		}
		catch(Exception $e)
		{
			$results['status'] = 'FAILED_QUERY';
			$results['reason'] = ''.$e;
		}
		
		return $results;
	}
	
	public function setCaseCatering( $case_num, $caterer, $menu )
	{
		$results = array();
		
		if(empty($case_num))
		{
			$results['status'] = 'FAILED_BAD_PARAM';
			return $results;
		}
		
		return $results;
	}
}

?>